package com.lagou.niancheng.lagouserviceuser.ext;

import com.lagou.niancheng.lagou.service.common.Result;
import com.lagou.niancheng.lagou.service.common.ResultBuilder;
import com.lagou.niancheng.lagou.service.common.UserApi;
import com.lagou.niancheng.lagouserviceuser.service.TokenService;
import org.apache.dubbo.config.annotation.Service;

import javax.annotation.Resource;


@Service
public class UserApiService implements UserApi {

    @Resource
    private TokenService tokenService;

    @Override
    public Result<Boolean> checkToken(String token) {
        return ResultBuilder.toSuccess(tokenService.checkToken(token));
    }
}
